package com.Eastiy.EXO.View;

import android.graphics.drawable.GradientDrawable;

public class roundRect extends GradientDrawable {
    public roundRect(Object obj, Object obj2, String str, Object obj3) {
        int[] iArr = null;
        float[] fArr = null;
        GradientDrawable.Orientation orientation = (str == "TB" || str == null) ? GradientDrawable.Orientation.TOP_BOTTOM : str == "LR" ? GradientDrawable.Orientation.LEFT_RIGHT : str == "RT" ? GradientDrawable.Orientation.BL_TR : str == "RB" ? GradientDrawable.Orientation.TL_BR : null;
        int i = (obj3 == new Integer(0) || obj3 == null) ? 0 : obj3 == new Integer(1) ? 1 : obj3 == new Integer(2) ? 2 : 0;
        if (!isArray(obj)) {
            setColors(new int[]{((Integer) obj).intValue(), ((Integer) obj).intValue(), ((Integer) obj).intValue()});
        } else {
            setColors((int[]) obj);
        }
        if (!isArray(obj2)) {
            setCornerRadii(new float[]{Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(obj2).append("").toString()).floatValue()});
        } else {
            int[] iArr2 = (int[]) obj2;
            setCornerRadii(new float[]{Float.valueOf(new StringBuffer().append(iArr2[0]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[0]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[1]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[1]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[2]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[2]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[3]).append("").toString()).floatValue(), Float.valueOf(new StringBuffer().append(iArr2[3]).append("").toString()).floatValue()});
        }
        if (obj2 == null) {
            setCornerRadii(new float[]{(float) 10, (float) 10, (float) 10, (float) 10, (float) 10, (float) 10, (float) 10, (float) 10});
        }
        setShape(0);
        setGradientType(i);
        setOrientation(orientation);
    }

    public static boolean isArray(Object obj) {
        if (obj == null) {
            return false;
        }
        return obj.getClass().isArray();
    }
}
